using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.CompositeUI.SmartParts;
using Microsoft.Practices.CompositeUI.Utility;

namespace SCSFContrib.CompositeUI.WPF.Workspaces
{
	/// <summary>
	/// Provides information to the <see cref="ZoneWorkspace"/> when displaying smart parts.
	/// </summary>
	public class ZoneSmartPartInfo : SmartPartInfo
	{
		private string _zoneName;

		/// <summary>
		/// Gets or sets the name of the zone in which the smart part should be placed.
		/// </summary>
		public string ZoneName
		{
			get
			{
				return _zoneName;
			}
			set
			{
				_zoneName = value;
			}
		}

		/// <summary>
		/// Constructs an instance of <c>ZoneSmartPartInfo</c>.
		/// </summary>
		public ZoneSmartPartInfo()
		{
		}

		/// <summary>
		/// Constructs an instance of <c>ZoneSmartPartInfo</c> with the specified zone name.
		/// </summary>
		/// <param name="zoneName">
		/// The zone name.
		/// </param>
		public ZoneSmartPartInfo(string zoneName)
			: this()
		{
			_zoneName = zoneName;
		}

		/// <summary>
		/// Applies the properties of this <c>ZoneSmartPartInfo</c> to <paramref name="smartPartInfo"/>.
		/// </summary>
		/// <param name="smartPartInfo">
		/// The <c>ZoneSmartPartInfo</c> to be updated.
		/// </param>
		internal void ApplyTo(ZoneSmartPartInfo smartPartInfo)
		{
			Guard.ArgumentNotNull(smartPartInfo, "smartPartInfo");
			smartPartInfo._zoneName = _zoneName;
		}
	}
}